package javaClassExercise.designPatterns.builderModel;

import java.util.List;

/**
 * Created by lomo.
 *
 * bulderModel Test Class
 */
public class BuilderModelTest {
    public static void main(String... args) {
        Builder builder = new Builder(); //创建Builder类对象, 如下输出:
        //System.out.print(builder.getClass()); //class javaClassExercise.designPatterns.builderModel.Builder

        List<Sender> s1 = builder.produceMailSender(6);  //产生2个MailSender类对象
        System.out.println(s1.size());
        s1.get(5).send(); //您调用了创建者模式里的MailSender类的send方法！
        builder.produceSmsSender(3); //产生2个SmsSender类对象

    }
}
